import request from '@/utils/request'

export function getGroupbuyList(query) {
  return request({
    url: '/promotion/groupbuy/getList',
    method: 'post',
    data: query
  })
}

export function getGroupbuyDetail(id) {
  return request({
    url: '/promotion/groupbuy/getDetail',
    method: 'post',
    data: id
  })
}

export function saveGroupbuy(id) {
  return request({
    url: '/promotion/groupbuy/save',
    method: 'post',
    data: id
  })
}

export function removeGroupbuyByID(id) {
  return request({
    url: '/promotion/groupbuy/delete',
    method: 'post',
    data: id
  })
}

export function changeGroupbuyStatusByID(formdata) {
  return request({
    url: '/promotion/groupbuy/change-status',
    method: 'post',
    data: formdata
  })
}

